/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.util.List;
/*     */ import net.minecraft.block.state.IBlockState;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.entity.Entity;
/*     */ import net.minecraft.util.math.BlockPos;
/*     */ import net.minecraft.util.math.MathHelper;
/*     */ import net.minecraft.util.math.Vec3d;
/*     */ 
/*     */ public abstract class yv<E extends Entity> {
/*     */   public int u;
/*     */   public E j;
/*     */   public double c;
/*     */   public double r;
/*     */   public double f;
/*     */   
/*     */   public void v(Entity entity) {
/*  19 */     this.j = (E)entity;
/*     */   }
/*     */   
/*     */   public double s;
/*     */   public double m;
/*     */   public double l;
/*     */   public double t;
/*     */   public double d;
/*     */   public double z;
/*     */   public boolean i = true;
/*  29 */   public Boolean w = null;
/*  30 */   public Boolean q = null;
/*     */   
/*     */   private static final float g = 30.0F;
/*     */   
/*     */   public yv(Entity entity) {
/*  35 */     this.j = (E)entity;
/*  36 */     if (this.j != null) {
/*     */       
/*  38 */       this.u = entity.func_145782_y();
/*  39 */       this.c = ((Entity)this.j).field_70165_t;
/*  40 */       this.r = ((Entity)this.j).field_70163_u;
/*  41 */       this.f = ((Entity)this.j).field_70161_v;
/*     */     } 
/*     */     
/*  44 */     this.t = this.s = 0.0D;
/*  45 */     this.d = this.m = 1.0D;
/*  46 */     this.z = this.l = 0.0D;
/*     */   }
/*     */ 
/*     */   
/*     */   public void z(boolean bool) {
/*  51 */     this.w = Boolean.valueOf(bool);
/*     */   }
/*     */ 
/*     */   
/*     */   public void h() {
/*  56 */     this.w = null;
/*     */   }
/*     */ 
/*     */   
/*     */   public void v(boolean bool) {
/*  61 */     this.q = Boolean.valueOf(bool);
/*     */   }
/*     */ 
/*     */   
/*     */   public void z() {
/*  66 */     this.q = null;
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean s() {
/*  72 */     if (this.w != null) {
/*  73 */       return this.w.booleanValue();
/*     */     }
/*  75 */     List list = ((Entity)this.j).field_70170_p.func_184144_a((Entity)this.j, this.j.func_174813_aQ().func_72317_d(0.0D, -0.02500000037252903D, 0.0D));
/*  76 */     return (list.size() > 0);
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean y() {
/*  81 */     List list = ((Entity)this.j).field_70170_p.func_184144_a((Entity)this.j, this.j
/*  82 */         .func_174813_aQ().func_72317_d(this.t, 0.0D, this.z));
/*     */     
/*  84 */     return (list.size() > 0);
/*     */   }
/*     */   public double b() {
/*  87 */     return this.c;
/*     */   } public double n() {
/*  89 */     return this.r;
/*     */   } public double g() {
/*  91 */     return this.f;
/*     */   } public double i() {
/*  93 */     return this.t;
/*     */   } public double l() {
/*  95 */     return this.d;
/*     */   } public double q() {
/*  97 */     return this.z;
/*     */   } public double k() {
/*  99 */     return this.s;
/*     */   } public double d() {
/* 101 */     return this.m;
/*     */   } public double c() {
/* 103 */     return this.l;
/*     */   }
/*     */ 
/*     */   
/*     */   public boolean t() {
/* 108 */     return this.i;
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean h() {
/* 114 */     double d1 = 0.0025D;
/* 115 */     double d2 = this.t * this.t + this.z * this.z;
/* 116 */     return (this.q != null) ? this.q.booleanValue() : ((d2 == 0.0D));
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public E v() {
/* 122 */     return this.j;
/*     */   }
/*     */ 
/*     */   
/*     */   public float h() {
/* 127 */     Vec3d vec3d = this.j.func_70040_Z();
/* 128 */     return (float)v(vec3d.field_72450_a, vec3d.field_72449_c);
/*     */   }
/*     */   public static double v(double a, double d1) {
/* 131 */     return Math.atan2(a, d1) / Math.PI * 180.0D;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public float v() {
/* 140 */     if (h())
/* 141 */       return 0.0F; 
/* 142 */     return z() - h();
/*     */   }
/*     */ 
/*     */   
/*     */   public double s() {
/* 147 */     if (h()) {
/* 148 */       return 0.0D;
/*     */     }
/* 150 */     Vec3d vec3d1 = this.j.func_70040_Z();
/* 151 */     Vec3d vec3d2 = (new Vec3d(vec3d1.field_72450_a, 0.0D, vec3d1.field_72449_c)).func_72432_b();
/* 152 */     return vec3d2.field_72450_a * this.t + vec3d2.field_72449_c * this.z;
/*     */   }
/*     */ 
/*     */   
/*     */   public double y() {
/* 157 */     if (h())
/* 158 */       return 0.0D; 
/* 159 */     Vec3d vec3d1 = this.j.func_70040_Z().func_178785_b(-1.5707964F);
/* 160 */     Vec3d vec3d2 = (new Vec3d(vec3d1.field_72450_a, 0.0D, vec3d1.field_72449_c)).func_72432_b();
/* 161 */     return vec3d2.field_72450_a * this.t + vec3d2.field_72449_c * this.z;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean z() {
/* 168 */     float f = v();
/* 169 */     return ((f >= 30.0F && f <= 150.0F) || (f >= -150.0F && f <= -30.0F));
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public boolean v() {
/* 178 */     if (!this.j.func_70090_H()) {
/* 179 */       return false;
/*     */     }
/* 181 */     int i = MathHelper.func_76128_c(((Entity)this.j).field_70165_t);
/* 182 */     int j = MathHelper.func_76128_c(((Entity)this.j).field_70163_u + 2.0D);
/* 183 */     int k = MathHelper.func_76128_c(((Entity)this.j).field_70161_v);
/* 184 */     IBlockState iBlockState = (Minecraft.func_71410_x()).field_71441_e.func_180495_p(new BlockPos(i, j, k));
/* 185 */     return iBlockState.func_177230_c() instanceof net.minecraft.block.BlockStaticLiquid;
/*     */   }
/*     */ 
/*     */   
/*     */   public double t() {
/* 190 */     return Math.sqrt(this.s * this.s + this.m * this.m + this.l * this.l);
/*     */   }
/*     */ 
/*     */   
/*     */   public double h() {
/* 195 */     return Math.sqrt(this.t * this.t + this.d * this.d + this.z * this.z);
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public double z() {
/* 201 */     return Math.sqrt(this.t * this.t + this.z * this.z);
/*     */   }
/*     */ 
/*     */   
/*     */   public double v() {
/* 206 */     return Math.sqrt(this.s * this.s + this.l * this.l);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void v() {
/* 213 */     this.s = this.t;
/* 214 */     this.m = this.d;
/* 215 */     this.l = this.z;
/*     */     
/* 217 */     this.t = ((Entity)this.j).field_70165_t - this.c;
/* 218 */     this.d = ((Entity)this.j).field_70163_u - this.r;
/* 219 */     this.z = ((Entity)this.j).field_70161_v - this.f;
/*     */     
/* 221 */     this.c = ((Entity)this.j).field_70165_t;
/* 222 */     this.r = ((Entity)this.j).field_70163_u;
/* 223 */     this.f = ((Entity)this.j).field_70161_v;
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\yv.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */